package com.entity;

import java.io.Serializable;
import javax.persistence.*;

import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the COMPLAIN_ database table.
 * 
 */
@Entity
@Table(name="COMPLAIN_")
@NamedQuery(name="Complain.findAll", query="SELECT c FROM Complain c")
public class Complain implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="COMPLAIN__COMPLAINID_GENERATOR", sequenceName="SEQ",initialValue=1,allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="COMPLAIN__COMPLAINID_GENERATOR")
	@Column(name="COMPLAIN_ID")
	private long complainId;

	@Column(name="COMPLAIN_CLASSIFY")
	private String complainClassify;

	@Column(name="COMPLAIN_COMPLAINANT")
	private String complainComplainant;

	@Column(name="COMPLAIN_DAS")
	private String complainDas;

	@Temporal(TemporalType.DATE)
	@Column(name="COMPLAIN_DATE")
	private Date complainDate;

	@Column(name="COMPLAIN_DESCRIBE")
	private String complainDescribe;

	@Column(name="COMPLAIN_FEEDBACK")
	private String complainFeedback;

	@Column(name="COMPLAIN_IFDELETE")
	private BigDecimal complainIfdelete;

	@Temporal(TemporalType.DATE)
	@Column(name="COMPLAIN_INTODATE")
	private Date complainIntodate;

	@Column(name="COMPLAIN_PROCEDURE")
	private String complainProcedure;

	@Column(name="COMPLAIN_RECEIVER")
	private String complainReceiver;

	@Column(name="COMPLAIN_REMARK")
	private String complainRemark;

	@Column(name="COMPLAIN_RESULTS")
	private String complainResults;

	@Column(name="COMPLAIN_RETURN")
	private String complainReturn;

	@Column(name="COMPLAIN_SPENDTIME")
	private String complainSpendtime;

	@Temporal(TemporalType.DATE)
	@Column(name="COMPLAIN_TIME")
	private Date complainTime;

	@Column(name="COMPLAIN_URGENCY")
	private BigDecimal complainUrgency;

	//bi-directional many-to-one association to Customer
	@ManyToOne
	@JoinColumn(name="CUSNO")
	private Customer customer;

	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;
	
	//客户id
	@Transient
	private Long cusno;
	//用户id
	@Transient
	private Long userId1;
	
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String idRange;

	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String dasRange;
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String receiverRange;
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String timeRange;
	
	//高级查询中紧急程度的集合
	@Transient
	private List<Object> complainUrgencyList;

	//高级查询中花费时间的集合
	@Transient
	private List<Object> complainSpendtimeList;

	//高级查询中分类的集合
	@Transient
	private List<Object> complainClassifyList;

	//高级查询中处理结果的集合
	@Transient
	private List<Object> complainResultsList;

	//高级查询中日期集合
	@Transient
	private List<Object> complainDateStartAndStop;
	//高级查询中开始日期
	@Transient
	private Date complainDateStart;

	//高级查询中结束日期
	@Transient
	private Date complainDateStop;
	
	public List<Object> getComplainDateStartAndStop() {
		return complainDateStartAndStop;
	}

	public void setComplainDateStartAndStop(List<Object> complainDateStartAndStop) {
		this.complainDateStartAndStop = complainDateStartAndStop;
	}
	
	public Long getCusno() {
		return cusno;
	}

	public void setCusno(Long cusno) {
		this.cusno = cusno;
	}

	public Long getUserId1() {
		return userId1;
	}

	public void setUserId1(Long userId1) {
		this.userId1 = userId1;
	}

	public String getIdRange() {
		return idRange;
	}

	public void setIdRange(String idRange) {
		this.idRange = idRange;
	}

	public String getDasRange() {
		return dasRange;
	}

	public void setDasRange(String dasRange) {
		this.dasRange = dasRange;
	}

	public String getReceiverRange() {
		return receiverRange;
	}

	public void setReceiverRange(String receiverRange) {
		this.receiverRange = receiverRange;
	}

	public String getTimeRange() {
		return timeRange;
	}

	public void setTimeRange(String timeRange) {
		this.timeRange = timeRange;
	}

	public List<Object> getComplainUrgencyList() {
		return complainUrgencyList;
	}

	public void setComplainUrgencyList(List<Object> complainUrgencyList) {
		this.complainUrgencyList = complainUrgencyList;
	}

	public List<Object> getComplainSpendtimeList() {
		return complainSpendtimeList;
	}

	public void setComplainSpendtimeList(List<Object> complainSpendtimeList) {
		this.complainSpendtimeList = complainSpendtimeList;
	}

	public List<Object> getComplainClassifyList() {
		return complainClassifyList;
	}

	public void setComplainClassifyList(List<Object> complainClassifyList) {
		this.complainClassifyList = complainClassifyList;
	}

	public List<Object> getComplainResultsList() {
		return complainResultsList;
	}

	public void setComplainResultsList(List<Object> complainResultsList) {
		this.complainResultsList = complainResultsList;
	}

	public Date getComplainDateStart() {
		return complainDateStart;
	}

	public void setComplainDateStart(Date complainDateStart) {
		this.complainDateStart = complainDateStart;
	}

	public Date getComplainDateStop() {
		return complainDateStop;
	}

	public void setComplainDateStop(Date complainDateStop) {
		this.complainDateStop = complainDateStop;
	}

	public Complain() {
	}

	public long getComplainId() {
		return this.complainId;
	}

	public void setComplainId(long complainId) {
		this.complainId = complainId;
	}

	public String getComplainClassify() {
		return this.complainClassify;
	}

	public void setComplainClassify(String complainClassify) {
		this.complainClassify = complainClassify;
	}

	public String getComplainComplainant() {
		return this.complainComplainant;
	}

	public void setComplainComplainant(String complainComplainant) {
		this.complainComplainant = complainComplainant;
	}

	public String getComplainDas() {
		return this.complainDas;
	}

	public void setComplainDas(String complainDas) {
		this.complainDas = complainDas;
	}

	public Date getComplainDate() {
		return this.complainDate;
	}

	public void setComplainDate(Date complainDate) {
		this.complainDate = complainDate;
	}

	public String getComplainDescribe() {
		return this.complainDescribe;
	}

	public void setComplainDescribe(String complainDescribe) {
		this.complainDescribe = complainDescribe;
	}

	public String getComplainFeedback() {
		return this.complainFeedback;
	}

	public void setComplainFeedback(String complainFeedback) {
		this.complainFeedback = complainFeedback;
	}

	public BigDecimal getComplainIfdelete() {
		return this.complainIfdelete;
	}

	public void setComplainIfdelete(BigDecimal complainIfdelete) {
		this.complainIfdelete = complainIfdelete;
	}

	public Date getComplainIntodate() {
		return this.complainIntodate;
	}

	public void setComplainIntodate(Date complainIntodate) {
		this.complainIntodate = complainIntodate;
	}

	public String getComplainProcedure() {
		return this.complainProcedure;
	}

	public void setComplainProcedure(String complainProcedure) {
		this.complainProcedure = complainProcedure;
	}

	public String getComplainReceiver() {
		return this.complainReceiver;
	}

	public void setComplainReceiver(String complainReceiver) {
		this.complainReceiver = complainReceiver;
	}

	public String getComplainRemark() {
		return this.complainRemark;
	}

	public void setComplainRemark(String complainRemark) {
		this.complainRemark = complainRemark;
	}

	public String getComplainResults() {
		return this.complainResults;
	}

	public void setComplainResults(String complainResults) {
		this.complainResults = complainResults;
	}

	public String getComplainReturn() {
		return this.complainReturn;
	}

	public void setComplainReturn(String complainReturn) {
		this.complainReturn = complainReturn;
	}

	public String getComplainSpendtime() {
		return this.complainSpendtime;
	}

	public void setComplainSpendtime(String complainSpendtime) {
		this.complainSpendtime = complainSpendtime;
	}

	public Date getComplainTime() {
		return this.complainTime;
	}

	public void setComplainTime(Date complainTime) {
		this.complainTime = complainTime;
	}

	public BigDecimal getComplainUrgency() {
		return this.complainUrgency;
	}

	public void setComplainUrgency(BigDecimal complainUrgency) {
		this.complainUrgency = complainUrgency;
	}

	public Customer getCustomer() {
		return this.customer;
	}

	public void setCustomer(Customer customer) {
		this.customer = customer;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public String toString() {
		return "Complain [complainId=" + complainId + ", complainClassify=" + complainClassify
				+ ", complainComplainant=" + complainComplainant + ", complainDas=" + complainDas + ", complainDate="
				+ complainDate + ", complainDescribe=" + complainDescribe + ", complainFeedback=" + complainFeedback
				+ ", complainIfdelete=" + complainIfdelete + ", complainIntodate=" + complainIntodate
				+ ", complainProcedure=" + complainProcedure + ", complainReceiver=" + complainReceiver
				+ ", complainRemark=" + complainRemark + ", complainResults=" + complainResults + ", complainReturn="
				+ complainReturn + ", complainSpendtime=" + complainSpendtime + ", complainTime=" + complainTime
				+ ", complainUrgency=" + complainUrgency + ", customer=" + customer + ", user=" + user + "]";
	}
}